-
Notifications
You must be signed in to change notification settings - Fork 343
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple applications push and pull API #15396
Conversation
eae55a2
to
bb42d83
Compare
cf2eb52
to
aaf1135
Compare
a49969c
to
26bedd5
Compare
cc03fd1
to
5afbcc8
Compare
d614228
to
ae99a92
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor comments, otherwise lgtm
try { | ||
appsRequest = parseBody(request, PushMultipleAppsRequest.class); | ||
} catch (JsonSyntaxException e) { | ||
throw new BadRequestException("Invalid request body.", e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this particular case we want to include e.getMessage() in the error message, since that is what gets displayed to the user.
Note that this is not always what we want, especially for non-user facing exceptions, as that leads to duplicate logging.
TransactionRunners.run(transactionRunner, context -> { | ||
validateOnlyOneGitOperationRunning(namespace, context); | ||
getOperationRunStore(context).createOperationRun(operationRunId, detail); | ||
statePublisher.publishStarting(operationRunId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note that it is possible to publish multiple starting messages if this transaction fails and is retried. Though I think the subscriber handles that case so it's not an issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah publishing multiple messages should not be an issue here as subscriber will effectively deduplicate it
4d4c682
to
888aa26
Compare
ae99a92
to
a79a55c
Compare
a79a55c
to
a00f520
Compare
[🍒] Add APIs to do multi pull/push from #15396
Add API endpoints for multiple applications push and pull.
Also restrict one multi operation at a time.